//
//  JYJMusicsModel.m
//  HappyListen
//
//  Created by 冀永金 on 16/8/29.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "JYJMusicsModel.h"
#import "JYJMusicsContentModel.h"
#import "JYJChannelModel.h"
@implementation JYJMusicsModel
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"musics"]) {
        NSMutableArray<JYJMusicsContentModel *> *marr = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            JYJMusicsContentModel *model = [JYJMusicsContentModel modelWithDic:dic];
            [marr addObject:model];
        }
        self.musics = marr;
    }
    if ([key isEqualToString:@"channel"]) {
        _model = [JYJChannelModel modelWithDic:value];
    }
}
@end
